# -*- coding: UTF-8 -*-
from pangolin.common.file_common import *
from scrapy.utils.project import get_project_settings


def upload():
    """
        测试文件上传
    """
    settings = get_project_settings()
    file_server_conf = settings.get('FILE_SERVER_CONF')
    local_dir = file_server_conf['local_dir']
    remote_dir = file_server_conf['remote_dir']
    file_common = FileCommonClass()
    file_common.upload_all_by_sftp(local_dir, remote_dir)

if __name__ == "__main__":
    upload()
